package com.dsbj.apolo.facecollector;

import com.dsbj.apolo.facecollector.service.FaceWebService;
import com.dsbj.apolo.facecollector.service.FaceWebServiceImpl;
import com.dsbj.apolo.facecollector.utils.PropertyUtil;
import com.dsbj.apolo.facecollector.utils.SpringContextUtil;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;

import javax.xml.ws.Endpoint;

@SpringBootApplication
@ComponentScan(basePackages = "com.dsbj")
@MapperScan("com.dsbj.apolo.facecollector.mapper")
public class FaceCollectorApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext run = SpringApplication.run(FaceCollectorApplication.class, args);
        SpringContextUtil.setContext(run);
        FaceWebService jwsService = new FaceWebServiceImpl();
        String address = PropertyUtil.getWebServiceAddress();
        //System.out.println(PropertyUtil.getInfo());
        //soap1.0发布方式
        Endpoint.publish(address,jwsService);
    }

}
